package org.devbg.academy.corejava.shop.db.entities;

import java.util.SortedSet;
import java.util.TreeSet;

import org.devbg.academy.corejava.shop.db.utils.CategoryComparator;
import org.devbg.academy.corejava.shop.db.utils.ProductComparator;

public class Category extends BasePojo {

	/**
	 * The serial version UID of the class.
	 */
	private static final long serialVersionUID = 1L;

	private String name;

	private Category parent;

	private SortedSet<Category> childCategories = new TreeSet<Category>(
			new CategoryComparator());

	private SortedSet<Product> products = new TreeSet<Product>(
			new ProductComparator());

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Category getParent() {
		return parent;
	}

	public void setParent(Category parent) {
		this.parent = parent;
	}

	public SortedSet<Category> getChildCategories() {
		return childCategories;
	}

	public void setChildCategories(SortedSet<Category> childCategories) {
		this.childCategories = childCategories;
	}

	public SortedSet<Product> getProducts() {
		return products;
	}

	public void setProducts(SortedSet<Product> products) {
		this.products = products;
	}

	@Override
	public String toString() {
		return super.toString();
	}
}
